<?php

/**
 * LEAGUEMan
 * 
 * Copyright (C) 2007 Marko Bischof
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
class ResultTransferObject
{
    private $match_id;
    private $group_name;
    private $team1_id;
    private $team1_name;
    private $team1_name_short;
    private $team2_id;
    private $team2_name;
    private $team2_name_short;
    private $result_0_1;
    private $result_0_2;
    private $result_1_1;
    private $result_1_2;
    private $result_2_1;
    private $result_2_2;
    private $result_3_1;
    private $result_3_2;
    private $result_4_1;
    private $result_4_2;
    private $result_5_1;
    private $result_5_2;
    private $result_type;
    private $date;
    private $time;
    private $published;

    public function __construct($row)
    {
        $this->match_id         = $row->match_id;
        $this->group_name       = $row->match_group;
        $this->team1_id         = $row->team1_id;
        $this->team1_name       = $row->team1_name;
        $this->team1_name_short = $row->team1_name_short;
        $this->team2_id         = $row->team2_id;
        $this->team2_name       = $row->team2_name;
        $this->team2_name_short = $row->team2_name_short;

        $this->result_0_1 = $row->match_result_0_1;
        $this->result_0_2 = $row->match_result_0_2;
        $this->result_1_1 = $row->match_result_1_1;
        $this->result_1_2 = $row->match_result_1_2;
        $this->result_2_1 = $row->match_result_2_1;
        $this->result_2_2 = $row->match_result_2_2;
        $this->result_3_1 = $row->match_result_3_1;
        $this->result_3_2 = $row->match_result_3_2;
        $this->result_4_1 = $row->match_result_4_1;
        $this->result_4_2 = $row->match_result_4_2;
        $this->result_5_1 = $row->match_result_5_1;
        $this->result_5_2 = $row->match_result_5_2;

        $this->result_type = $row->match_result_type;
        $this->date        = $row->match_date;
        $this->time        = $row->match_time;
        $this->published   = $row->published;
    }

    public function getTeam1Name()
    {
        return $this->team1_name;
    }

    public function getTeam2Name()
    {
        return $this->team2_name;
    }

}